home *** CD-ROM | disk | FTP | other *** search
/ Aminet 15 / Aminet 15 - Nov 1996.iso / Aminet / dev / basic / ace24dist.lha / ace24.lha / include / devices / gameport.h < prev    next >
C/C++ Source or Header  |  1996-09-10  |  2KB  |  69 lines

  1. #ifndef DEVICES_GAMEPORT_H
  2. #define DEVICES_GAMEPORT_H 1
  3. /*
  4. ** gameport.h for ACE Basic
  5. **
  6. ** Note: Translated to ACE by ConvertC2ACE
  7. **       @ MapMeadow Software, Nils Sjoholm
  8. **
  9. **
  10. ** Date: 09/03/95
  11. **
  12. **
  13. */
  14.  
  15. /*
  16. ** This are the StructPointer defines for gameport.h
  17. */
  18. #ifndef GamePortTriggerPtr
  19. #define GamePortTriggerPtr ADDRESS
  20. #endif
  21. /*
  22. ** End of StructPointer defines for gameport.h
  23. */
  24.       
  25. #ifndef EXEC_TYPES_H
  26. #include    <exec/types.h>
  27. #endif
  28.  
  29. #ifndef EXEC_IO_H
  30. #include    <exec/io.h>
  31. #endif
  32.  
  33.  
  34. /******  GamePort commands ******/
  35. #define  GPD_READEVENT     (CMD_NONSTD+0)
  36. #define  GPD_ASKCTYPE      (CMD_NONSTD+1)
  37. #define  GPD_SETCTYPE      (CMD_NONSTD+2)
  38. #define  GPD_ASKTRIGGER    (CMD_NONSTD+3)
  39. #define  GPD_SETTRIGGER    (CMD_NONSTD+4)
  40.  
  41. /******  GamePort structures ******/
  42.  
  43. /* gpt_Keys */
  44. #define  GPTB_DOWNKEYS     0
  45. #define  GPTF_DOWNKEYS     (1)
  46. #define  GPTB_UPKEYS       1
  47. #define  GPTF_UPKEYS       (2)
  48.  
  49. STRUCT GamePortTrigger  
  50.    SHORTINT gpt_Keys      /* key transition triggers */
  51.    SHORTINT gpt_Timeout       /* time trigger (vertical blank units) */
  52.    SHORTINT gpt_XDelta        /* X distance trigger */
  53.    SHORTINT gpt_YDelta        /* Y distance trigger */
  54. END STRUCT 
  55.  
  56. /****** Controller Types ******/
  57. #define  GPCT_ALLOCATED    -1    /* allocated by another user */
  58. #define  GPCT_NOCONTROLLER 0
  59.  
  60. #define  GPCT_MOUSE    1
  61. #define  GPCT_RELJOYSTICK  2
  62. #define  GPCT_ABSJOYSTICK  3
  63.  
  64.  
  65. /****** Errors ******/
  66. #define  GPDERR_SETCTYPE   1     /* this controller not valid at this time */
  67.  
  68. #endif  /* DEVICES_GAMEPORT_H */
  69.